#!/usr/bin/php -q
<?php
/* change this to the base directory of Wondertool */
chdir('/usr/local/ezproxy/docs_aux/wondertool');

include('wt_config.inc.php');
$output = array();
exec(SFX_EXTRACT_SCRIPT.' > '.SFX_IMPORT_FILE, $output);
if ($output) {
    die("Failed to extract SFX:\n\n" . implode("\n", $output));
}
include('db.inc.php');
importSFX(true); // true to send summary email to admin(s)
